#include <windows.h>
#include "CCharUpdatePacket.h"

CCharUpdatePacket::CCharUpdatePacket(CChar *schar) {
	this->type = 0xDF;
	this->size = 0x0E;

	memset(data, 0, 24);

	memcpy(data, &(schar->m_id), sizeof(schar->m_id));
	memcpy(data+4, &(schar->h.hp), sizeof(schar->h.hp));
	memcpy(data+8, &(schar->h.mp), sizeof(schar->h.mp));
	memcpy(data+12, &(schar->h.tp), sizeof(schar->h.tp));

	int tID = schar->getTargId();

	memcpy(data+16, &tID, sizeof(schar->getTargId()));
	
	memcpy(data+18, &(schar->h.hpp), sizeof(schar->h.hpp));
	memcpy(data+18, &(schar->h.mpp), sizeof(schar->h.mpp));

}

CCharUpdatePacket::~CCharUpdatePacket() {
}
